package com.ytc.cquery.controller;

import com.ytc.cquery.model.Cquery;
import com.ytc.cquery.service.CqueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

//公司查询
@Controller
public class CqueryController {
    @Autowired
    private CqueryService cqueryService;

    @RequestMapping("queryCquery")
    public String queryCquery(Model model){
        List<Cquery> list=cqueryService.queryCquery();
        model.addAttribute("list",list);
        return "cquery/cquery";
    }

}
